-- GENERATED SPELL FOR [Blight Spreader] --


function spell0_31831(pUnit, Event) --@Flame Breath,Self--
pUnit:FullCastSpellOnTarget(50989,pUnit)
pUnit:RegisterEvent('Sorts_31831', 3000, 1)
end

function spell1_31831(pUnit, Event) --@Plague Barrel,n/a--
pUnit:FullCastSpellOnTarget(59761,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31831', 1500, 1)
end

function Sorts_31831(pUnit, Event)
local choix_sorts_31831 = math.random(0, 1)
if choix_sorts_31831 == 0 then
pUnit:RegisterEvent('spell0_31831', 1, 1)
end
if choix_sorts_31831 == 1 then
pUnit:RegisterEvent('spell1_31831', 1, 1)
end
end

function mob31831_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31831', math.random(1500, 3000), 1)
end

function mob31831_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31831_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31831_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31831, 1, 'mob31831_Action')
RegisterUnitEvent(31831, 2, 'mob31831_Leave')
RegisterUnitEvent(31831, 3, 'mob31831_Kill')
RegisterUnitEvent(31831, 4, 'mob31831_Die')
